home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
lanuts.arc
/
KC.C
< prev
next >
Wrap
Text File
|
1991-10-30
|
369b
|
22 lines
/* get keycode */
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
main () {
int done;
union REGS regs;
done = FALSE;
while (!done) {
puts("Press a key");
regs.x.ax = 0;
int86(0x16,®s,®s);
printf("Key code is Scan %x, Ascii %x.\n",regs.h.ah,regs.h.al);
if (regs.h.al == 27) done = TRUE;
}
}